#include <initializer_list>
#include <iostream>
#include <exception>
#include <vector>
using namespace std;
class PointSequence
{
public:
	PointSequence(initializer_list<double> args)
	{
		if (args.size() % 2 != 0) {
			throw invalid_argument("initializer_list should "
				"contain even number of elements. ");
		}
		for (auto iter = args.begin(); iter != args.end(); ++iter)
			mVectPoints.push_back(*iter);
	}

	void dumpPoints() const
	{
		for (auto citer = mVectPoints.cbegin();
			citer != mVectPoints.cend(); citer += 2) {
			cout << "(" << *citer << ", " << *(citer + 1) << ")" << endl;
		}
	}
protected:
	vector<double> mVectPoints;
};

//int main()
//{
//	PointSequence p1 = { 1.0,2.0,3.0,4.0,5.0,6.0 };
//	p1.dumpPoints();
//	try {
//		PointSequence p2 = { 1.0,2.0,3.0 };
//	}
//	catch (const invalid_argument& e) {
//		cout << e.what() << endl;
//	}
//}